import { S } from '../../s';
import { IPSDELogic } from './ipsdelogic';
import { IPSDELogicParam } from './ipsdelogic-param';
import { PSDELogicNodeImpl } from './psdelogic-node-impl';

export class PSDEDEDataFlowLogicImpl extends PSDELogicNodeImpl {
  protected dstpsdelogicparam: IPSDELogicParam;
  getDstPSDELogicParam(): IPSDELogicParam | null {
    if (this.dstpsdelogicparam != null) return this.dstpsdelogicparam;
    const value = this.M.getDstPSDELogicParam;
    if (value == null) {
      return;
    }
    const ipsdelogic = this.getParentPSModelObject(S._200) as IPSDELogic;
    if (ipsdelogic != null) {
      this.dstpsdelogicparam = ipsdelogic.findPSDELogicParam(value);
    }
    return this.dstpsdelogicparam;
  }

  protected retpsdelogicparam: IPSDELogicParam;
  getRetPSDELogicParam(): IPSDELogicParam | null {
    if (this.retpsdelogicparam != null) return this.retpsdelogicparam;
    const value = this.M.getRetPSDELogicParam;
    if (value == null) {
      return;
    }
    const ipsdelogic = this.getParentPSModelObject(S._200) as IPSDELogic;
    if (ipsdelogic != null) {
      this.retpsdelogicparam = ipsdelogic.findPSDELogicParam(value);
    }
    return this.retpsdelogicparam;
  }
}
